package com.example.livebroadcast.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.livebroadcast.dao.LiveRedisDAO;
import com.example.livebroadcast.model.LiveRedis;

@Service
public class LiveService {

	@Autowired
	private LiveRedisDAO liveRedisDAO;

	public List<LiveRedis> getAll() {
		return liveRedisDAO.getAll();
	}
	
	public void save(LiveRedis liveRedis) {
		liveRedisDAO.put(liveRedis.getKeyname(), liveRedis, -1);
	}
}
